//
// Created by zerax on 2020/11/1.
//

#include "cube.hh"

namespace Math {
    Cube::Cube(glm::vec3 a, glm::vec3 b) : a(a), b(b) {

    }

    bool Cube::includes(glm::vec3 point) const {
        if (point.x < a.x || point.x > b.x) return false;
        if (point.y < a.y || point.y > b.y) return false;
        if (point.z < a.z || point.z > b.z) return false;
        return true;
    }
}